﻿function goMap24() {
    Map24.loadApi(["core_api", "wrapper_api"], map24ApiLoaded);
}

function map24ApiLoaded() {
    Map24.MapApplication.init({ NodeName: "maparea" });
}

var htmlObj = null;

Create content of HTML object.
var htmlContent = "<b>The Big Ben</b>" +
    "<br/>" +
    "The tower was raised as a part of Charles Barrys design of a new palace, after the old Palace of Westminster" +
    "<p>" +
    "<img src=\"/images/ms/files/london_bigben.jpg\" />" +
    "</p>";
    var DestToLat = Map24.trim($v("DestToLat"));
    var DestToLong = Map24.trim($v("DestToLong"));
//    var DestFromName = Map24.trim($v("DestFromName"));

function add(count) {
        for(var i = 0, i<count, i++){
    //Create a location with a tooltip. Tooltips are HTML objects that are shown when a mouse event 
    //occurs on the location. The content of the tooltip is set in TooltipContent. 
    myLoc = new Map24.Location({
      Longitude: document.getElementByID('DestToLong'+i),
      Latitude: document.getElementByID('DestToLat'+i),
      LogoURL: "http://img.map24.com/map24/3DSignet/signet3d22x20.gif",
      TooltipContent: document.getElementByID('htmlContent'+i),
      TooltipLayout: Map24.MapObject.LAYOUT_BALLOON,
      TooltipSize: Map24.MapObject.SIZE_S
    });
    //Call commit() on the location. The location is shown on the map.
    myLoc.commit();
    }

}
